#include "ShopCartItem.h"
#include "ui_ShopCartItem.h"

ShopCartItem::ShopCartItem(QListWidget *parent) :
    QListWidget(parent),
    ui(new Ui::ShopCartItem)
{
    ui->setupUi(this);
}

ShopCartItem::~ShopCartItem()
{
    delete ui;
}

//加载item中的信息
void ShopCartItem::init(QString name, int price){
    ui->name_label->setText(name);
    ui->price_label->setText(QString::number(price));
}
